<?php

namespace app\admin\validate\music;

use think\Validate;

class MusicSkewerValidate extends Validate
{
    protected $rule=array(
        "id"=>"require",
        "title"=>"require",
        "music_id"=>"require",
        "type_id"=>"require",
        "img"=>"require",
        "price"=>"require",
        "content"=>"require",
    );
    protected $message=array(
        "id|require"=>"id为空",
        "music_id|require"=>"请选择音乐",
        "title|require"=>"标题不能为空",
        "type_id|require"=>"请选择创作者",
        "img|require"=>"请上传图片",
        "price|require"=>"请输入金额",
        "content|require"=>"请输入内容",
    );
    protected $scene=array(
        "create"=>array("title","img","music_id","price","content"),
        "update"=>array("id","title","img","music_id","price","content"),
    );
}